import Vue from 'vue'
import VueRouter from 'vue-router'
import store from "@/store"


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Header',
    component: () => import('../views/Header.vue'),
    children: [
      {
        path: '/Home',
        name: 'Home',
        component: () => import('../views/Home.vue'),
      },
      {
        path: '/about',
        name: 'about',
        component: () => import('../views/about.vue'),
      },
      {
        path: '/goods',
        name: 'goods',
        component: () => import('../views/goods.vue'),
      },
      {
        path: '/goods/details',
        name: 'details',
        component: () => import('../views/details.vue'),
      },
      ,
      {
        path: '/order',
        name: 'order',
        component: () => import('../views/order.vue'),
      },
      {
        path: '/collect',
        name: 'collect',
        component: () => import('../views/collect.vue'),
      }, {
        path: '/shoppingCart',
        name: 'shop',
        component: () => import('../views/shop.vue'),
      },
      {
        path: '/confirmOrder',
        name: 'confirmOrder',
        component: () => import('../views/confirmOrder.vue'),
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})



export default router
